Grab lock around registering watch.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 26 Jul 2005 17:07:50 +0000 (17:07 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 26 Jul 2005 17:07:50 +0000 (17:07 +0000)
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index c3d453047c4b9470a6b292ac84f1fae50bff6ab0..b703bcce7d01230339bb1edde45f4c91c35bec22 100644 (file)
@@ -262,7 +262,9 @@ int do_xenbus_probe(void *unused)
        /* Enumerate devices in xenstore. */
        xenbus_probe_devices("device");
 
+       down(&xenbus_lock);
        register_xenbus_watch(&dev_watch);
+       up(&xenbus_lock);
        return 0;
 }